<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/base.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/info-mgt.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/WdatePicker.css" />
<title>网上招聘系统</title>
<style type="text/css">
	a:link {
 	font-size: 12px;
 	color: #000000;
	text-decoration: none;
	}
	a:visited {
	font-size: 12px;
	color: #000000;
 	text-decoration: none;
	}
	a:hover {
 	font-size: 12px;
 	color: #999999;
 	text-decoration: none;
	}
</style>
</head>
<body>
<div class="title"><h2>招聘信息搜索</h2></div>
<div class="query">
<form id="jobQueryForm">
	<div class="query-conditions ue-clear">
		<div class="conditions name ue-clear">
            <label>主题：</label>
        	<input style="width:195px;height:25px;border:1px solid #C5D6E0" name="title" type="text">
        </div>
        <div class="conditions name ue-clear">
            <label>公司：</label>
        	<input style="width:195px;height:25px;border:1px solid #C5D6E0" name="companyName" type="text">
        </div>
        <div class="conditions name ue-clear">
            <label>地址：</label>
        	<input style="width:195px;height:25px;border:1px solid #C5D6E0" name="location" type="text">
        </div>
        <div class="conditions name ue-clear">
            <label>职位类别：</label>
            <select name="profession" style="width:200px;height:28px;border:1px solid #C5D6E0">
	        	<option>不限</option>
	           	<option>软件工程</option>
	          	<option>经济管理</option>
	          	<option>数学</option>
	          	<option>土木工程</option>
	          	<option>法学</option>
	        </select>
        </div>
        <div class="conditions operate-time ue-clear">
            <label>薪资范围：</label>
            <div class="select-wrap">
               <select name="salary" style="width:200px;height:30px;border:1px solid #C5D6E0">
               		<option>不限</option>
		        	<option >1000-3000</option>
		        	<option >3001-5000</option>
		            <option >5001-7000</option>
		            <option >7001-9000</option>
		        	<option >9001-11000</option>
		        	<option >11001-30000</option>
		        	<option >30001以上</option>
		       </select>
            </div>
        </div>
    </div>
    <input name="applicantId" type="hidden" value="${applicantId }">
    <div class="query-btn ue-clear">
		<input style="background-color:#68B86C;color:white;border-radius:10px" type="button" onclick="submitJobQuery();" value="查询"/>
		<input style="background-color:#EFF6FA;color:black;border-radius:10px" type="reset" value="清空"/>    
	</div>
</form>
</div>
<div id="jobQueryResultTable" class="table-box">
	<table>
    	<thead>
        	<tr>
            	<th class="num">序号</th>
            	<th class="node">标题</th>
                <th class="name">公司名称</th>
                <th class="process">类型</th>
                <th class="node">薪资</th>
                <th class="node">联系方式</th>
                <th class="node">操作</th>
            </tr>
        </thead>
        <tbody>
			<c:forEach items="${dataList }" var ="job"  begin="0" varStatus="status">  
				<tr>
            		<td class="num">${status.count }</td>
            		<td class="node"><a style="color:blue" href="${pageContext.request.contextPath }/company/view/job/${job.id }.action">${job.title}</a></td>
                	<td class="name">${job.companyName}</td>
                	<td class="node">${job.profession}</td>
                	<td class="node">${job.salary}</td>
                	<td class="node">${job.phone}</td>
                	<td class="node"><a name="selectResumeA" style="color:red" href="${pageContext.request.contextPath }/applicant/toApply/job/${applicantId}/${job.id }.action">我要申请</a></td>
            	</tr>
      		</c:forEach>  
        </tbody>
    </table>
</div>
<div class="pagination ue-clear"></div>

</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/core.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/WdatePicker.js"></script>
<!--  <script type="text/javascript" src="js/jquery.pagination.js"></script>-->
<!--<script type="text/javascript">
 $('.pagination').pagination(100,{
	callback: function(page){
	},
	display_msg: true,
	setPageNo: true
});
</script>-->
<script type="text/javascript">
$("tbody").find("tr:odd").css("backgroundColor","#eff6fa");
function submitJobQuery() {
	console.log("submitJobQuery--" + $("#jobQueryForm").serialize());
	$.ajax({
		url : "${pageContext.request.contextPath}/company/query/job.action",
		type : "post",
		data : $("#jobQueryForm").serialize(),
		dataType : "html",
		success : function(data) {
			$("#jobQueryResultTable").html(data);
		}
	});
	
}

</script>
</html>